/**

* <p>Title: UserController.java</p>

* <p>Description: </p>

* <p>Copyright: Copyright (c) 2021</p>

* <p>Company: www.chinasofti.com</p>

* @author knowno

* @date 2021年3月11日

* @version 1.0

*/
package com.etc.controller;

import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import com.etc.entity.User;
import com.etc.zmall.service.UserService;

/**
 * 
 * <p>
 * Title: UserController
 * </p>
 * 
 * <p>
 * Description:
 * </p>
 * 
 * @author knowno
 * 
 * @date 2021年3月11日
 * 
 */
@RestController
public class UserController {

	@Autowired
	private UserService userService;

	@GetMapping(value = "api/front/login.do")
	public User login(User user, HttpSession session) {
		user = userService.selectUsers(user);
		session.setAttribute("user", user);
		return user;
	}
}
